//头文件
#ifndef SCATTER_H
#define SCATTER_H

#include <QWidget>
#include <QPainter>
#include <QLabel>
#include<QComboBox>
#include <QPaintEvent>
#include <QTimer>
#include <QTime>

const int ORIGIN_X=30; //定义原点X
const int ORIGIN_Y=370;//定义原点Y
const int WIDTH_X=350;//定义X轴宽度
const int HEIGTH_Y=350;//定义Y轴高度
const int MAX_X=1500;
const int MAX_Y=1500;
const int MIN_X=500;
const int MIN_Y=500;
class Scatter : public QWidget
{
    Q_OBJECT
public:
    explicit Scatter(QWidget *parent = nullptr);
    QPixmap mPixMap;
    QLabel *mLabel;
    QTimer *one;
    QComboBox *mXAisle;
    QComboBox *mYAisle;
    QComboBox *mXCondition;
    QComboBox *mYCondition;
    double XScale;
    double YScale;
private:
    uint16_t xSlam, ySlam;
    uint16_t xPosPre, yPosPre, xPosPro, yPosPro;

public:
    uint16_t getXSlam();
    uint16_t getYSlam();
    uint16_t getXPosPre();
    uint16_t getYPosPre();
    uint16_t getXPosPro();
    uint16_t getYPosPro();
    void setXSlam(uint16_t xSlam);
    void setYSlam(uint16_t ySlam);
    void setXPosPre(uint16_t xPosPre);
    void setYPosPre(uint16_t yPosPre);
    void setXPosPro(uint16_t xPosPro);
    void setYPosPro(uint16_t yPosPro);

signals:
public: // slots:
    void PlotSCatter(uint16_t *xSlam, uint16_t *ySlam);
    void DrawLines(uint16_t *xDrone, uint16_t *yDrone);
};

#endif // SCATTER_H
